#ifndef __NETWORK_H_H
#define __NETWORK_H_H

#include "common.h"
#include "log.h"

#define DEFAULT_NETWORK_DEV  "bond0"
#define NET_WORK_BUFFER_SIZE  		4096
#define DEFAULT_NETWRK_PORT  9528
typedef struct __NetWork
{
	char tcp_ip[32];
	int tcp_fd;
	volatile int clientfd;
	int port;
	int readtcplen;
	int sendlen;
	unsigned char *readtcpbuf;
	unsigned char *sendbuf;
	int connectretry;
	int connected;
}NetInfo;
int tcp_init(const char* ip,  int port) ;
int check_socket_connect(int sockfd);
int get_local_ip(const char *eth_inf, char *ip);
int client_socket_init(void);
int client_socket_connect_to_server(int vclientfd,char *ip,int port);
#endif 
